home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_013 / charstrip.bas < prev    next >
BASIC Source File  |  1992-05-06  |  594b  |  20 lines

  1. 20    '    Program to strip all non-printing characters from a file'
  2. 30    '-
  3. 40    '
  4. 50    input% = 1
  5. 60    output% = 2
  6. 70    legalchars$ = chr$(9) + chr$(10) + chr$(13)
  7. 100   input "Input file> "; infile$
  8. 110   input "Output file> "; outfile$
  9. 120   open "i", #input%, infile$
  10. 130   open "o", #output%, outfile$
  11. 200   if eof(input%) then goto 990
  12. 210   get #input%, char$
  13. 215   if ( instr (legalchars$,char$) > 0 ) then goto 220
  14. 216   if ( (char$ > "~") or (char$ < " ") ) then goto 200
  15. 220   print #output%, using "&"; char$;
  16. 500   goto 200
  17. 990   close #input%
  18. 991   close #output%
  19. 999   end
  20.